﻿using NUnit.Framework;

namespace SyringeControl.Tests
{
    [TestFixture]
    public class Test_ViewControlModel
    {
        [Test]
        public void Notifies_about_properties_setting()
        {
            var model = new ViewControlModel();
            var modifiedProperty = "";
            model.PropertyChanged += (o,e) => modifiedProperty = e.PropertyName;
            foreach (var prop in model.GetType().GetProperties())
            {
                prop.SetValue(model, null, null);
                Assert.That(modifiedProperty, Is.EqualTo(prop.Name));
            }
        }
    }
}
